<div style="width: 100%;position: relative;">
    <h1 mat-dialog-title style="display:inline-block;cursor:move;" mat-dialog-draggable>关联量测属性</h1>
    <mat-icon (click)="onNoClick()" class="dialog-close-btn">clear</mat-icon>
    <div class="my-form-field" style="display:inline-block;">
        <div class="my-form-field" style="display: block;margin-bottom: 10px;">
            <span style="line-height: 28px;display:inline-block;vertical-align: middle;">设备接口</span>
            <!-- <button mat-icon-button (click)="onAddDevice()"  style="line-height: 28px;height:28px; width:28px; vertical-align: middle;" >
                <mat-icon matTooltip="添加接口" *ngIf="!addUrl">add</mat-icon>
                <mat-icon matTooltip="选择接口" *ngIf="addUrl">home</mat-icon>
            </button> -->
            <select *ngIf="!addUrl" (change)="onUrlChange(url)"  matNativeControl [(ngModel)]="url" >
                <option *ngFor="let d of deviceList" [value]="d.property.address">
                  {{d.property.address}}
                </option>
            </select>
        </div>
        <div *ngIf="addUrl">
            <div class="my-form-field" style="display: block;margin-bottom: 10px;">
                <span>设备id</span>
                <input (blur)="getMeasureList(deviceId)" [(ngModel)]="deviceId" type="text" style="width:300px" >
            </div>
            <div class="my-form-field" style="display: block;margin-bottom: 10px;">
                <span>量测属性</span>
                <select (change)="onMeasureCodeChange(measureCode)" [disabled]="deviceMeasureList.length===0" style="width:100%" matNativeControl [(ngModel)]="measureCode" >
                    <option *ngFor="let measure of deviceMeasureList" [value]="measure.code">
                      {{measure.name}}
                    </option>
                </select>
            </div>
            <!-- <div class="my-form-field" style="display: block;margin-bottom: 10px;">
                <span>请求地址</span>
                <input [(ngModel)]="url" type="text" style="width:300px" >
            </div>
            <div class="my-form-field" style="display: block;margin-bottom: 10px;">
                <span>请求参数</span>
                <input [(ngModel)]="jsonParam" type="text" style="width:300px" >
            </div> -->
            <div class="my-form-field" style="display: block;margin-bottom: 10px;">
                <span>实时数据时间间隔(s)</span>
                <input [(ngModel)]="polling" type="text" style="width:300px" >
            </div>
        </div>
        <!-- <button mat-raised-button (click)="onMeasure()">确定</button> -->
        <!-- <button mat-raised-button (click)="onShowTag()">添加订阅</button> -->
        <!-- <button mat-raised-button (click)="onBindTag()">选择订阅</button> -->
    </div> 
    <div mat-dialog-actions class="dialog-action">
        <button mat-raised-button (click)="onNoClick()">{{'dlg.cancel' | translate}}</button>
        <button mat-raised-button (click)="onOkClick()" color="primary" cdkFocusInitial>{{'dlg.ok' | translate}}</button>
    </div>
</div>
